/**
 * Created by yuris on 09.02.15.
 */
package layers {
import InterfaceObjects.BottomPanel.BottomPanel;

import starling.display.Sprite;
import starling.events.Event;

public class InterfaceLayer extends Sprite {

    private var _bottomPanel:BottomPanel;

    public function InterfaceLayer() {
        super();
        this._bottomPanel = new BottomPanel();

        this.addEventListener(Event.ADDED_TO_STAGE, HANDLER_addedToStage);
    }

    private function HANDLER_addedToStage(event:Event):void {
        this._drawInterface();
    }


    private function _drawInterface():void {
        this._bottomPanel.y = this.stage.stageHeight;
        this._bottomPanel.x = this.stage.stageWidth/2;
        this.addChild(this._bottomPanel);
    }

    public function get bottomPanel():BottomPanel {
        return _bottomPanel;
    }
}
}
